.bg-gradient-primary {
    background-color: #073b4c;
    background-image: linear-gradient(
        180deg,#073b4c 40%,#0f7699 100%);
    background-size: cover;
}

.img-logo-login {
    max-width: 100%;
    height: auto;
}

.img-logo-sidebar {
    max-width: 150px;
    height: auto;
}

ul.toggled .img-logo-sidebar {
    max-width: 80px;
    height: auto;
}

.form-roles .radio label {
    display: block;
    margin: 15px 0;
}
.form-radio {
    margin-bottom: -0.4em !important;
    margin-right: 0.5em;
}
input[type=radio] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
    width: 25px;
    height: 25px;
    padding: 6px;
    background-clip: content-box;
    border: 2px solid #5a5c69;
    background-color: #cccccc;
    border-radius: 50%;
}
input[type=radio]:checked {
    background-color: #36a8cf;
}
.nav .active{
    background-color: #e3e6ed;
    color: #546b81;
}
.btn-mid {
    position: absolute;
    top: 50%;
}

.div-scroll{
    width: 100%;
    border: none 0px RED;
    overflow-x: scroll;
    overflow-y:hidden;
    height: 20px;
}
.div-scroll-h {
    width:1500px;
    height: 20px;
}

.table-responsive tbody tr:hover {
    background-color: #eff6fd;
}
.table-responsive tbody tr.remnant {
    background-color: #ecffe9;
}
.table-responsive tbody tr.block {
    background-color: #ffebe9;
}

.table-responsive thead tr:hover {
    background-color: transparent;
}

.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sidebar .nav-item .collapse .collapse-inner .collapse-item {
    white-space: normal;
}

ul.toggled .nav-item .collapse .collapse-inner .collapse-item {
    white-space: nowrap;
}

.sidebar .nav-item .collapse .collapse-inner .collapse-header, .sidebar .nav-item .collapsing .collapse-inner .collapse-header {
    color: #073b4c;
    text-transform: none;
    font-size: .75rem;
}

.modal-header {
    background-color: rgb(15, 118, 153);
    opacity: 0.9;
    color: white;
}

.close {
    color: #FFF;
}

.close:hover {
    color: #FFF;
}

.error {
    color: #5a5c69;
    font-size: 1rem;
    position: relative;
    line-height: 1;
    width: auto;
}

.error-message {
    color: red;
}

.modal-dialog-crud {
    height: 80vh;
}

/* Nuevo diseño del menú de acciones */
.board-action-menu {
    position: relative;
    display: inline-block;
}

.board-menu-trigger {
    cursor: pointer;
    padding: 0.5rem;
    color: #5a5c69;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
}

.board-menu-trigger:hover {
    color: #073b4c;
    background-color: #f8f9fc;
}

.board-action-menu-content {
    display: none;
    position: fixed;
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 380px;
    max-height: 500px;
    overflow: hidden;
    z-index: 1080;
    border: 1px solid #e3e6f0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.board-action-menu-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.board-menu-header {
    background: linear-gradient(135deg, #073b4c 0%, #0f7699 100%);
    color: #fff;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.board-menu-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.board-menu-id {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.board-menu-body {
    padding: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.board-menu-item,
.board-action-menu-content .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #5a5c69;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
}

.board-menu-item::before,
.board-action-menu-content .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.board-menu-item:hover,
.board-action-menu-content .dropdown-item:hover,
.board-menu-item:focus,
.board-action-menu-content .dropdown-item:focus {
    background-color: #f8f9fc;
    color: #073b4c;
    text-decoration: none;
}

.board-menu-item:hover::before,
.board-action-menu-content .dropdown-item:hover::before {
    background-color: #073b4c;
}

.board-menu-item i,
.board-action-menu-content .dropdown-item i {
    width: 18px;
    text-align: center;
    color: #858796;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.board-menu-item:hover i,
.board-action-menu-content .dropdown-item:hover i {
    color: #073b4c;
}

.board-menu-item span,
.board-action-menu-content .dropdown-item span {
    flex: 1;
    line-height: 1.4;
}

/* Compatibilidad con items antiguos sin iconos */
.board-action-menu-content .dropdown-item:not(:has(i)) {
    padding-left: 2.5rem;
}

.board-action-menu-content .dropdown-item:not(:has(i))::before {
    content: '•';
    color: #858796;
    font-size: 1.2rem;
    position: absolute;
    left: 1.25rem;
    transition: color 0.2s ease;
}

.board-action-menu-content .dropdown-item:not(:has(i)):hover::before {
    color: #073b4c;
}

/* Scrollbar personalizado para el menú */
.board-menu-body::-webkit-scrollbar {
    width: 6px;
}

.board-menu-body::-webkit-scrollbar-track {
    background: #f8f9fc;
}

.board-menu-body::-webkit-scrollbar-thumb {
    background: #d1d3e2;
    border-radius: 3px;
}

.board-menu-body::-webkit-scrollbar-thumb:hover {
    background: #a0a2b8;
}

/* Ocultar el header modal antiguo si existe */
.board-action-menu-content .modal-header {
    display: none;
}

/* Compatibilidad con el diseño antiguo */
.board-menu {
    background-color: #fff;
    z-index: 1080 !important;
    position: absolute;
    min-width: 280px;
    max-width: 350px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: visible;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
}

/* Asegurar que el dropdown se posicione correctamente */
.board-table .actions .dropdown-menu {
    right: 0;
    left: auto;
    top: 100%;
    margin-top: 0.25rem;
    transform: none;
    white-space: normal;
}

.nobr { white-space: nowrap }

#products-list td {
    font-size: 13px;
}

.message-error {
    border: solid thin red;
    padding: 10px;
    background-color: #fbd7d7;
}

@media (min-width: 1200px) {

}

@media (max-width: 767px) {
    .img-logo-sidebar {
        max-width: 80px;
        height: auto;
    }
}

@media (max-width: 576px) {
    .col-mbl-hd {
        display: none;
    }

    .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl {
        padding-left: 0.1rem;
        padding-right: 0.1rem;
    }

    /* Tabs más compactos en móvil */
    #entryTabs .nav-link {
        font-size: 0.75rem;
        padding: 0.5rem 0.5rem;
    }

    #entryTabs .nav-link i {
        display: none;
    }
}

/* Estilos para los tabs del tablero de entradas */
#entryTabs {
    border-bottom: 2px solid #e3e6f0;
    background-color: #fff;
}

#entryTabs .nav-link {
    color: #5a5c69;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

#entryTabs .nav-link:hover {
    border-bottom-color: #ddd;
    background-color: #f8f9fc;
}

#entryTabs .nav-link.active {
    color: #073b4c;
    border-bottom-color: #073b4c;
    background-color: #f8f9fc;
}

#entryTabs .nav-link i {
    margin-right: 0.5rem;
}

#entryTabs .badge {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

#entryTabs .badge-primary {
    background-color: #4e73df;
}

#entryTabs .badge-info {
    background-color: #36b9cc;
}

#entryTabs .badge-warning {
    background-color: #f6c23e;
    color: #3a3b45;
}

#entryTabs .badge-success {
    background-color: #1cc88a;
}

#entryTabs .badge-secondary {
    background-color: #858796;
}

#entryTabs .badge-danger {
    background-color: #e74a3b;
}

/* Animación de pulso para badges actualizados */
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.badge-pulse {
    animation: badge-pulse 0.5s ease-in-out;
}

/* Mejora visual de la columna Estado */
.table-scroll-h tbody td[style*="font-weight: 600"] {
    position: sticky;
    right: 0;
    box-shadow: -2px 0 4px rgba(0,0,0,0.05);
}

/* Indicador visual para filas según estado */
.table-responsive tbody tr {
    transition: all 0.2s ease;
}

.table-responsive tbody tr:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Optimización de tabla para reducir scroll horizontal */
.board-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.3rem;
    vertical-align: middle;
    text-align: center;
    line-height: 1.2;
}

.board-table tbody td {
    padding: 0.5rem 0.3rem;
    font-size: 0.8rem;
    vertical-align: middle;
}

/* Columnas compactas para fechas */
.compact-date {
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
}

.compact-date small {
    font-size: 0.7rem;
    color: #858796;
}

/* Columnas compactas para pesos */
.compact-weights {
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Columna de estado compacta */
.compact-status {
    text-align: center;
    padding: 0.4rem 0.2rem !important;
}

.compact-status span {
    display: inline-block;
    word-break: break-word;
}

/* Reducir espacio en columnas de números */
.board-table td.col-mbl-hd {
    white-space: nowrap;
}

/* Optimizar el scroll horizontal */
.div-scroll-h {
    width: 1600px;
}

/* Estilos específicos para tabs de salidas - Diseño vertical */
#exitTabs {
    border: none;
    background-color: transparent;
}

#exitTabs .nav-link {
    color: #5a5c69;
    border: none;
    border-left: 4px solid transparent;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    border-radius: 4px;
    text-align: left;
}

#exitTabs .nav-link .tab-text {
    display: flex;
    align-items: center;
    flex: 1;
    text-align: left;
    min-width: 0;
}

#exitTabs .nav-link:hover {
    border-left-color: #ddd;
    background-color: #f0f2f5;
    color: #073b4c;
}

#exitTabs .nav-link.active {
    color: #073b4c;
    border-left-color: #073b4c;
    background-color: #e3e6ed;
    font-weight: 700;
}

#exitTabs .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

#exitTabs .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Contenedor de tabs verticales */
#exitTabs.flex-column {
    padding: 15px 10px;
}

/* Ajustes para el diseño vertical del tablero */
.d-flex .border-right {
    border-right: 1px solid #e3e6f0 !important;
}

/* Hacer la tabla más compacta */
.table-bordered td, .table-bordered th {
    border: 1px solid #e3e6f0;
}

/* Primera y última columna fijas (sticky) con el menú de hamburguesa */
.board-table thead th:first-child,
.board-table tbody td:first-child,
.board-table thead th:last-child,
.board-table tbody td:last-child {
    position: -webkit-sticky;
    position: sticky;
    z-index: 10;
    background-color: #fff;
    border-right: 2px solid #e3e6f0;
}

.board-table thead th:first-child,
.board-table tbody td:first-child {
    left: 0;
}

.board-table thead th:last-child,
.board-table tbody td:last-child {
    right: 0;
    border-right: none;
    border-left: 2px solid #e3e6f0;
}

.board-table thead th:first-child,
.board-table thead th:last-child {
    z-index: 11;
    background-color: #f8f9fc;
}

.board-table tbody tr:hover td:first-child,
.board-table tbody tr:hover td:last-child {
    background-color: #eff6fd;
}

/* Asegurar que la columna sticky funcione correctamente */
.table-responsive {
    position: relative;
}

/* Ajustar acciones para que sean más compactas */
.board-table .actions {
    padding: 0.3rem 0.2rem !important;
    text-align: center;
    position: relative;
    overflow: visible !important;
    min-width: 40px;
    width: 40px;
}

/* Estilos para el botón de acciones */
.board-action-btn {
    padding: 0.25rem 0.5rem !important;
    color: #5a5c69 !important;
    border: none !important;
    background: transparent !important;
    font-size: 1rem;
    transition: all 0.2s ease;
    line-height: 1;
}

.board-action-btn:hover {
    color: #073b4c !important;
    background-color: #f8f9fc !important;
    border-radius: 0.25rem;
}

.board-action-btn:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Estilos para los items de la modal */
#boardActionsModalBody .board-action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #5a5c69;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

#boardActionsModalBody .board-action-item:last-child {
    border-bottom: none;
}

#boardActionsModalBody .board-action-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

#boardActionsModalBody .board-action-item:hover {
    background-color: #f8f9fc;
    color: #073b4c;
    text-decoration: none;
}

#boardActionsModalBody .board-action-item:hover::before {
    background-color: #073b4c;
}

#boardActionsModalBody .board-action-item i {
    width: 18px;
    text-align: center;
    color: #858796;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

#boardActionsModalBody .board-action-item:hover i {
    color: #073b4c;
}

#boardActionsModalBody .board-action-item span {
    flex: 1;
    line-height: 1.4;
}

.board-table .actions i {
    font-size: 1rem;
    cursor: pointer;
    color: #5a5c69;
    transition: color 0.2s ease;
}

.board-table .actions i:hover {
    color: #073b4c;
}

.board-table .actions .dropdown {
    position: relative;
    display: inline-block;
}

/* Asegurar que el dropdown del menú de hamburguesa se muestre por encima de otros elementos */
.table-responsive {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mejorar el scroll en móviles */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .board-table {
        min-width: 800px;
    }
    
    /* En móviles, hacer la primera columna más ancha para mejor usabilidad */
    .board-table thead th:first-child,
    .board-table tbody td:first-child {
        min-width: 50px;
        width: 50px;
    }
    
    .board-table .actions {
        min-width: 50px;
        width: 50px;
        padding: 0.5rem !important;
    }
    
    .board-menu-trigger {
        font-size: 1.2rem;
    }
}

.board-table tbody td.actions {
    overflow: visible !important;
    position: relative;
}

/* Asegurar que cada fila tenga su propio contexto de apilamiento */
.board-table tbody tr {
    position: relative;
    z-index: 1;
}

.board-table tbody tr:hover {
    z-index: 2;
}

/* Asegurar que el dropdown abierto tenga z-index adecuado pero NO por encima de modales */
.board-table .actions .dropdown {
    position: static;
    z-index: 10;
}

.board-table .actions .dropdown.show {
    z-index: 1080 !important;
    position: static;
}

.board-table .actions .dropdown.show .dropdown-menu {
    z-index: 1080 !important;
    position: fixed !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    background-color: #fff;
    pointer-events: auto;
    display: block !important;
    transform: none !important;
    min-width: 280px !important;
    max-width: 350px !important;
    width: auto !important;
    padding: 0.5rem 0;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Clase para la fila con dropdown abierto - se aplica vía JavaScript */
.board-table tbody tr.dropdown-open {
    z-index: 10 !important;
    position: relative;
}

/* Prevenir que el hover de las filas interfiera con los dropdowns */
.board-table tbody tr:hover .actions .dropdown:not(.show) {
    z-index: 10;
}

.board-table tbody tr .actions .dropdown.show {
    z-index: 1080 !important;
}

/* Asegurar que las modales estén siempre por encima de todo */
.modal {
    z-index: 10000 !important;
}

.modal-backdrop {
    z-index: 9999 !important;
}

.modal-dialog {
    z-index: 10001 !important;
}

.modal-content {
    z-index: 10002 !important;
}

/* Asegurar que las filas de tabla NO se superpongan a las modales */
.board-table tbody tr,
.board-table tbody tr:hover,
.board-table tbody tr.dropdown-open,
.board-table tbody tr.selected,
.board-table tbody tr.active {
    z-index: 1 !important;
}

/* Cuando hay una modal abierta, asegurar que las filas no interfieran */
.modal-open .board-table tbody tr,
.modal-open .board-table tbody tr:hover,
.modal-open .board-table tbody tr.dropdown-open,
.modal-open .board-table tbody tr.selected,
.modal-open .board-table tbody tr.active {
    z-index: 1 !important;
}

/* Asegurar que los dropdowns no se muestren por encima de modales */
.modal-open .board-table .actions .dropdown.show,
.modal-open .board-table .actions .dropdown.show .dropdown-menu {
    z-index: 1 !important;
}

/* Asegurar que el menú esté por encima del sidebar pero debajo de modales */
.board-table .actions .dropdown.show .dropdown-menu {
    z-index: 1080 !important;
}

body:not(.modal-open) .board-table .actions .dropdown.show .dropdown-menu {
    z-index: 1080 !important;
}

/* Asegurar que los menús del sidebar estén por encima de los menús de hamburguesa cuando están abiertos */
.sidebar .nav-item .collapse.show {
    z-index: 1090 !important;
}

.sidebar .nav-item .collapse.show .collapse-inner {
    z-index: 1090 !important;
    position: relative;
}

/* Ocultar el header modal antiguo si existe */
.board-action-menu-content .modal-header {
    display: none;
}

/* Asegurar que Select2 dropdowns se muestren correctamente dentro de modales */
.modal .select2-container {
    z-index: 10050 !important;
}

.modal .select2-dropdown {
    z-index: 10051 !important;
}

.modal .select2-results {
    z-index: 10051 !important;
}

body.modal-open .select2-container {
    z-index: 10050 !important;
}

body.modal-open .select2-dropdown {
    z-index: 10051 !important;
}
